package com.web;

import com.pojo.ZhuTi_x;
import com.service.ZhuTiService_x;
import com.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("zhuti")
public class ZhuTiController_x {
    @Autowired
    private ZhuTiService_x zhuTiServiceX;
    @RequestMapping("select")
    Result getById(Integer id){
        return Result.ok(zhuTiServiceX.getById(id));
    }

   @RequestMapping("add")
   Result add(ZhuTi_x zhuTiX){
       return Result.ok(zhuTiServiceX.add(zhuTiX));
   }
    @RequestMapping("delete")
    Result delete(Integer id){
       return Result.ok(zhuTiServiceX.delete(id));
    }
    @RequestMapping("selectAll")
    public List<ZhuTi_x> select(Integer id, String user, String content) {
        return zhuTiServiceX.select(id, user, content);
    }
}
